<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">建议仓库:</label>
        <div class="col-xs-12 col-sm-4"><!-- data-rule="required" -->
        	<input id="c-shelves_id" name="row[shelves_id]" type="hidden"  >
        	<input id="warehouse_name" name="row[warehouse_name]" type="hidden"  >
        	<input id="shelves_name" name="row[shelves_name]" type="hidden"  >
            <input id="c-warehouse_id"  data-source="information/warehouse/index" class="form-control selectpage" name="row[warehouse_id]" type="text" value="{$row.warehouse_id|htmlentities}">
        </div>
        <label  class="control-label col-xs-12 col-sm-2">建议货架/库区:</label>
        <div    class="col-xs-12 col-sm-3"><!-- data-rule="required" -->
            
            <input id="c-shelves_name"    disabled data-source="information/shelves/index" data-params='{"custom[warehouse_id]":"{$row.warehouse_id}"}' class="form-control selectpage" type="text" value="{$row.shelves_id|htmlentities}">
        </div>
        <a href="javascript:;"  id="choose-shelves" style="margin-left: -15px;"  class="col-sm-1 btn btn-success" title="打开选择" ><i class="fa fa-plus"></i> 选择</a>
    </div>
    <div class="form-group">
    	<label class="control-label col-xs-12 col-sm-2">最新仓库:</label>
        <div  class="col-xs-12 col-sm-4">
        	<input readonly class="form-control" type="text" value="{$row.lastest_warehouse_text|htmlentities}">
        </div>
        <label class="control-label col-xs-12 col-sm-2">{:__('最新路径')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input readonly class="form-control" type="text" value="{$row.lastest_shelves_text|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label  class="control-label col-xs-12 col-sm-2">{:__('Number')}:</label>
        <div  class="col-xs-12 col-sm-4">
            <input id="c-number" {$row.source==2?'readonly':''} class="form-control" name="row[number]" type="text" value="{$row.number|htmlentities}">
        </div>
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-name" {$row.source==2?'readonly':''} class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Specification')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-specification" {$row.source==2?'readonly':''} class="form-control" name="row[specification]" type="text" value="{$row.specification|htmlentities}">
        </div>
        <label class="control-label col-xs-12 col-sm-2">{:__('Attributes')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-attributes" readonly class="form-control" name="row[attributes]" type="text" value="{$row.attributes|htmlentities}">
        </div>
    </div>
  
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Classification_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-classification_id" data-rule="required" data-source="classification/index" class="form-control selectpage" name="row[classification_id]" type="text" value="{$row.classification_id|htmlentities}">
        </div>
    </div> -->
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Switch')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-switch" class="form-control" name="row[switch]" type="text" value="{$row.switch|htmlentities}">
        </div>
    </div> -->
    <div class="form-group">
        <!-- <label class="control-label col-xs-12 col-sm-2">{:__('Group')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-group" readonly class="form-control" name="row[group]" type="text" value="{$row.group|htmlentities}">
        </div> -->
        <label class="control-label col-xs-12 col-sm-2">{:__('Unit')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-unit" {$row.source==2?'readonly':''} class="form-control" name="row[unit]" type="text" value="{$row.unit|htmlentities}">
        </div>
        <label class="control-label col-xs-12 col-sm-2">{:__('StoreUnit')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-store_unit" {$row.source==2?'readonly':''} class="form-control" name="row[store_unit]" type="text" value="{$row.store_unit|htmlentities}">
        </div>
    </div>

    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Mbatch')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-mbatch" class="form-control" name="row[mbatch]" type="text" value="{$row.mbatch|htmlentities}">
        </div>
    </div> -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Safe_num')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-safe_num" class="form-control" name="row[safe_num]" type="number" value="{$row.safe_num|htmlentities}">
        </div>
        <label class="control-label col-xs-12 col-sm-2">{:__('Max_num')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-max_num" class="form-control" name="row[max_num]" type="number" value="{$row.max_num|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Min_num')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-min_num" class="form-control" name="row[min_num]" type="number" value="{$row.min_num|htmlentities}">
        </div>
        <label class="control-label col-xs-12 col-sm-2">{:__('Source')}:</label>
        <div class="col-xs-12 col-sm-4">   
            <select  id="c-source" class="form-control selectpicker" name="row[source]">
                {foreach name="sourceList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.source"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Classification_name')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-classification_name" {$row.source==2?'readonly':''} class="form-control" name="row[classification_name]" type="text" value="{$row.classification_name|htmlentities}">
        </div>
        <label class="control-label col-xs-12 col-sm-2">图片上传:</label>
        <div class="col-xs-12 col-sm-3">
            <input id="c-avatar" readonly class="form-control" name="row[image_url]" type="text" value="{$row.image_url|htmlentities}">
        </div>
            <span><button type="button"  style="margin-left: -15px;"  id="faupload-avatar" class="btn btn-danger faupload col-sm-1" data-preview-id="p-avatar" data-input-id="c-avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-multiple="false" ><i class="fa fa-upload"></i> 上传</button></span>
            <!-- data-resize-width="1200" data-resize-height="800" -->
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Ifshangjia')}:</label>
        <div class="col-xs-12 col-sm-4">
            {:build_radios('row[ifshangjia]', ['2'=>__('Shangjia'),'1'=>__('Shangkuqu'), '0'=>__('Default')], $row['ifshangjia'])}
        </div>
        <label class="control-label col-xs-12 col-sm-2">{:__('Ifjianhuo')}:</label>
        <div class="col-xs-12 col-sm-4">
            {:build_radios('row[ifjianhuo]', ['1'=>__('Jianhuo'), '0'=>__('Default')], $row['ifjianhuo'])}
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
        <div class="col-xs-12 col-sm-4">
            <textarea id="c-remark" class="form-control " rows="5" name="row[remark]" cols="50">{$row.remark|htmlentities}</textarea>
        </div>
        <label class="control-label col-xs-12 col-sm-2">物料二维码:</label>
        <div class="col-xs-12 col-sm-2">
            <img style="margin-top: -10px;" src="{$row.qrcode}">
        </div> 
        <div class="col-xs-12 col-sm-2">
            <ul class="row list-inline faupload-preview" style="margin-top: -10px;margin-left: -15px;" id="p-avatar"></ul>
        </div> 
    </div>
    
    
    <div class="form-group layer-footer">
        <div class="col-xs-12 col-sm-12 text-center">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
            <!-- <button type="button" class="btn btn-danger btn-embossed-copy">{:__('Copy')}</button> -->
        </div>
    </div>
</form>
